/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmInspection extends BasicModel<PmInspection> {
  createtime?: string; // 创建时间
  projectno?: string; // 项目编号
  name?: string; // 项目名称
  inspectiondate?: string; // 巡检日期
  inspector?: string; // 巡检人
  rectificationno?: string; // 整改编号
  inspectionresult?: string; // 整改结果
  fileno?: string; // 文件编号
  rectificationmethod?: string; // 整改方式
  finenum?: number; // 罚款金额
  checkresult?: string; // 巡检结果
  rectList?: any[]; // 子表列表
}

export const pmInspectionList = (params?: PmInspection | any) =>
  defHttp.get<PmInspection>({ url: adminPath + '/proj/xj/pmInspection/list', params });

export const pmInspectionListData = (params?: PmInspection | any) =>
  defHttp.post<Page<PmInspection>>({ url: adminPath + '/proj/xj/pmInspection/listData', params });

export const pmInspectionForm = (params?: PmInspection | any) =>
  defHttp.get<PmInspection>({ url: adminPath + '/proj/xj/pmInspection/form', params });

export const pmInspectionSave = (params?: any, data?: PmInspection | any) =>
  defHttp.postJson<PmInspection>({ url: adminPath + '/proj/xj/pmInspection/save', params, data });

export const pmInspectionDelete = (params?: PmInspection | any) =>
  defHttp.get<PmInspection>({ url: adminPath + '/proj/xj/pmInspection/delete', params });
